<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>emp-toolkit: /Users/wangxiao/git/emp-toolkit/emp-ot/ot/np.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo-full-doxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">emp-toolkit
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('np_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">np.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="np_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef OT_NP_H__</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define OT_NP_H__</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="ot_8h.html">ot.h</a>&quot;</span></div><div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="class_o_t_n_p.html">    9</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_o_t_n_p.html">OTNP</a>: <span class="keyword">public</span> <a class="code" href="class_o_t.html">OT</a>&lt;OTNP&gt; { <span class="keyword">public</span>:</div><div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="class_o_t_n_p.html#a5333e3a3665ba351d47400c3bbe6dfc6">   10</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="class_o_t_n_p.html#a5333e3a3665ba351d47400c3bbe6dfc6">cnt</a>;</div><div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="class_o_t_n_p.html#a81c6f652c7dde3a8d47c7f04e758e7ce">   11</a></span>&#160;    eb_t <a class="code" href="class_o_t_n_p.html#a81c6f652c7dde3a8d47c7f04e758e7ce">g</a>, <a class="code" href="class_o_t_n_p.html#ad0d1e24d65f1fc1f0af785bbfb9e380d">C</a>;</div><div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="class_o_t_n_p.html#a3d7cce47607ffe280cb72159349baea7">   12</a></span>&#160;    <span class="keyword">const</span> eb_t *<a class="code" href="class_o_t_n_p.html#a3d7cce47607ffe280cb72159349baea7">gTbl</a>;</div><div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="class_o_t_n_p.html#a59519bb7ec8cea235602e05e53b2976b">   13</a></span>&#160;    bn_t <a class="code" href="class_o_t_n_p.html#a59519bb7ec8cea235602e05e53b2976b">q</a>;</div><div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="class_o_t_n_p.html#abcfccee46e6dfa46872239da1bdb8714">   14</a></span>&#160;    <a class="code" href="class_p_r_g.html">PRG</a> <a class="code" href="class_o_t_n_p.html#abcfccee46e6dfa46872239da1bdb8714">prg</a>;</div><div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="class_o_t_n_p.html#ae1478826c797d7af4505c63be95e2834">   15</a></span>&#160;    <a class="code" href="class_o_t_n_p.html#ae1478826c797d7af4505c63be95e2834">OTNP</a>(<a class="code" href="class_net_i_o.html">NetIO</a> * <a class="code" href="class_o_t.html#a66a5cf62a5b5707e2af40719b2005340">io</a>): <a class="code" href="class_o_t.html">OT</a>(io) {</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;        <a class="code" href="utils__ec_8h.html#a782fdb3f06e7f49116d014d4a583b19f">initialize_relic</a>();</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;        eb_curve_get_gen(g);</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;        eb_curve_get_ord(q);</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;        gTbl = eb_curve_get_tab();</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        <a class="code" href="class_p_r_g.html">PRG</a> fix_prg(<a class="code" href="utils_2block_8h.html#a1a61c940fcdfab9d717ed2f9c27f3602">fix_key</a>);</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;        fix_prg.<a class="code" href="class_p_r_g.html#a0413492d30592c36c835091915bc9104">random_eb</a>(&amp;C, 1);</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    }</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="class_o_t_n_p.html#a1eb2d9931d7b74f17b1f4aca024e9729">   24</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_o_t_n_p.html#a1eb2d9931d7b74f17b1f4aca024e9729">send_impl</a>(<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>* data0, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>* data1, <span class="keywordtype">int</span> length) {</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;        bn_t r0, r1;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        eb_t pk0, pk1, *gr0 = <span class="keyword">new</span> eb_t[length], *gr1 = <span class="keyword">new</span> eb_t[length];</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;        eb_newl(pk0, pk1);</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        bn_newl(r0, r1);</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *m0 = <span class="keyword">new</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>[length];</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;        <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *m1 = <span class="keyword">new</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>[length];</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; length; ++i) {</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;            eb_newl(gr0[i], gr1[i]);</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;        }</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; length; ++i) {</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;            prg.<a class="code" href="class_p_r_g.html#ab8560a2768e2ed1d9ce3cdc26a3b793d">random_bn</a>(r0, r1);</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;            <a class="code" href="class_o_t.html#a66a5cf62a5b5707e2af40719b2005340">io</a>-&gt;<a class="code" href="class_i_o_channel.html#aa028f3ebb09c2cfa9c58be21ef81c271">recv_eb</a>(&amp;pk0, 1);</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;            eb_sub_norm(pk1, C, pk0);</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;            eb_mul_fix_norm(gr0[i], gTbl, r0);</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;            eb_mul_fix_norm(gr1[i], gTbl, r1);</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;            eb_mul_norm(pk0, pk0, r0);</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;            eb_mul_norm(pk1, pk1, r1);</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;            m0[i] = <a class="code" href="utils__ec_8h.html#ae5e3f2827ebda785cd770866307cc26d">KDF</a>(pk0);</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;            m1[i] = <a class="code" href="utils__ec_8h.html#ae5e3f2827ebda785cd770866307cc26d">KDF</a>(pk1);</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        }</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> m[2];</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0 ; i &lt; length; ++i) {</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;            <a class="code" href="class_o_t.html#a66a5cf62a5b5707e2af40719b2005340">io</a>-&gt;<a class="code" href="class_i_o_channel.html#aad8d725dd71ade3a6e846349beb16d43">send_eb</a>(&amp;gr0[i], 1);</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;            <a class="code" href="class_o_t.html#a66a5cf62a5b5707e2af40719b2005340">io</a>-&gt;<a class="code" href="class_i_o_channel.html#aad8d725dd71ade3a6e846349beb16d43">send_eb</a>(&amp;gr1[i], 1);</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;            m[0] = <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(data0[i], m0[i]);</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;            m[1] = <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(data1[i], m1[i]);</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;            <a class="code" href="class_o_t.html#a66a5cf62a5b5707e2af40719b2005340">io</a>-&gt;<a class="code" href="class_i_o_channel.html#ac896441a0a757bc1170d7544483f6f3a">send_data</a>(m, 2*<span class="keyword">sizeof</span>(<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>));</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        }</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        bn_freel(r0, r1);</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        eb_freel(pk0, pk1);</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i =0; i &lt; length; ++i)</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;            eb_freel(gr0[i], gr1[i]);</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        <span class="keyword">delete</span>[] gr0;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <span class="keyword">delete</span>[] gr1;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        <span class="keyword">delete</span>[] m0;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        <span class="keyword">delete</span>[] m1;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    }</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="class_o_t_n_p.html#aaac2cfa0f22a6cf5f57bd1cd60998678">   66</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_o_t_n_p.html#aaac2cfa0f22a6cf5f57bd1cd60998678">recv_impl</a>(<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>* data, <span class="keyword">const</span> <span class="keywordtype">bool</span>* b, <span class="keywordtype">int</span> length) {</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        bn_t * k = <span class="keyword">new</span> bn_t[length];</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        eb_t pk[2], E[2];</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> m[2];</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        eb_newl(E[0], E[1], pk[0], pk[1]);</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; length; ++i) {</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;            bn_newl(k[i]);</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        }</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        prg.<a class="code" href="class_p_r_g.html#ab8560a2768e2ed1d9ce3cdc26a3b793d">random_bn</a>(k, length);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i&lt; length; ++i) {</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;            <span class="keywordflow">if</span>(b[i]) {</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;                eb_mul_fix_norm(pk[1], gTbl, k[i]);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;                eb_sub_norm(pk[0], C, pk[1]);</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;            } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;                eb_mul_fix_norm(pk[0], gTbl, k[i]);</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;            }</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;            <a class="code" href="class_o_t.html#a66a5cf62a5b5707e2af40719b2005340">io</a>-&gt;<a class="code" href="class_i_o_channel.html#aad8d725dd71ade3a6e846349beb16d43">send_eb</a>(&amp;pk[0], 1);</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        }</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; length; ++i) {</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;            <a class="code" href="class_o_t.html#a66a5cf62a5b5707e2af40719b2005340">io</a>-&gt;<a class="code" href="class_i_o_channel.html#aa028f3ebb09c2cfa9c58be21ef81c271">recv_eb</a>(E, 2);</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;            <a class="code" href="class_o_t.html#a66a5cf62a5b5707e2af40719b2005340">io</a>-&gt;<a class="code" href="class_i_o_channel.html#aecdc2e6d7e95d96d346c63fc57e5b4eb">recv_data</a>(m, 2*<span class="keyword">sizeof</span>(<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>));</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;            <span class="keywordtype">int</span> ind = b[i] ? 1 : 0;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;            eb_mul_norm(E[ind], E[ind], k[i]);</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;            data[i] = <a class="code" href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a>(m[ind], <a class="code" href="utils__ec_8h.html#ae5e3f2827ebda785cd770866307cc26d">KDF</a>(E[ind]));</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        }</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; length; ++i) {</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;            bn_freel(k[i]);</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        }</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        eb_freel(pk[0], pk[1], E[0], E[1]);</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        <span class="keyword">delete</span>[] k;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    }</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;};</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;<span class="preprocessor">#endif// OT_NP_H__</span></div><div class="ttc" id="class_i_o_channel_html_ac896441a0a757bc1170d7544483f6f3a"><div class="ttname"><a href="class_i_o_channel.html#ac896441a0a757bc1170d7544483f6f3a">IOChannel::send_data</a></div><div class="ttdeci">void send_data(const void *data, int nbyte)</div><div class="ttdef"><b>Definition:</b> io_channel.h:14</div></div>
<div class="ttc" id="class_i_o_channel_html_aecdc2e6d7e95d96d346c63fc57e5b4eb"><div class="ttname"><a href="class_i_o_channel.html#aecdc2e6d7e95d96d346c63fc57e5b4eb">IOChannel::recv_data</a></div><div class="ttdeci">void recv_data(void *data, int nbyte)</div><div class="ttdef"><b>Definition:</b> io_channel.h:17</div></div>
<div class="ttc" id="garble_2block_8h_html_a65abbf31b0a30290189cdb5059b5f785"><div class="ttname"><a href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a></div><div class="ttdeci">__m128i block</div><div class="ttdef"><b>Definition:</b> block.h:8</div></div>
<div class="ttc" id="class_o_t_n_p_html_ae1478826c797d7af4505c63be95e2834"><div class="ttname"><a href="class_o_t_n_p.html#ae1478826c797d7af4505c63be95e2834">OTNP::OTNP</a></div><div class="ttdeci">OTNP(NetIO *io)</div><div class="ttdef"><b>Definition:</b> np.h:15</div></div>
<div class="ttc" id="utils_2block_8h_html_a939b7dd0e7479964d6fe6984b90dd5ce"><div class="ttname"><a href="utils_2block_8h.html#a939b7dd0e7479964d6fe6984b90dd5ce">xorBlocks</a></div><div class="ttdeci">block xorBlocks(block x, block y)</div><div class="ttdef"><b>Definition:</b> block.h:35</div></div>
<div class="ttc" id="class_net_i_o_html"><div class="ttname"><a href="class_net_i_o.html">NetIO</a></div><div class="ttdef"><b>Definition:</b> net_io_channel.h:22</div></div>
<div class="ttc" id="class_o_t_n_p_html_aaac2cfa0f22a6cf5f57bd1cd60998678"><div class="ttname"><a href="class_o_t_n_p.html#aaac2cfa0f22a6cf5f57bd1cd60998678">OTNP::recv_impl</a></div><div class="ttdeci">void recv_impl(block *data, const bool *b, int length)</div><div class="ttdef"><b>Definition:</b> np.h:66</div></div>
<div class="ttc" id="class_i_o_channel_html_aa028f3ebb09c2cfa9c58be21ef81c271"><div class="ttname"><a href="class_i_o_channel.html#aa028f3ebb09c2cfa9c58be21ef81c271">IOChannel::recv_eb</a></div><div class="ttdeci">void recv_eb(eb_t *eb, size_t num)</div><div class="ttdef"><b>Definition:</b> io_channel.h:150</div></div>
<div class="ttc" id="class_i_o_channel_html_aad8d725dd71ade3a6e846349beb16d43"><div class="ttname"><a href="class_i_o_channel.html#aad8d725dd71ade3a6e846349beb16d43">IOChannel::send_eb</a></div><div class="ttdeci">void send_eb(const eb_t *eb, size_t num)</div><div class="ttdef"><b>Definition:</b> io_channel.h:140</div></div>
<div class="ttc" id="utils_2block_8h_html_a1a61c940fcdfab9d717ed2f9c27f3602"><div class="ttname"><a href="utils_2block_8h.html#a1a61c940fcdfab9d717ed2f9c27f3602">fix_key</a></div><div class="ttdeci">const char fix_key[]</div><div class="ttdef"><b>Definition:</b> block.h:130</div></div>
<div class="ttc" id="ot_8h_html"><div class="ttname"><a href="ot_8h.html">ot.h</a></div></div>
<div class="ttc" id="class_o_t_n_p_html"><div class="ttname"><a href="class_o_t_n_p.html">OTNP</a></div><div class="ttdef"><b>Definition:</b> np.h:9</div></div>
<div class="ttc" id="class_o_t_n_p_html_a59519bb7ec8cea235602e05e53b2976b"><div class="ttname"><a href="class_o_t_n_p.html#a59519bb7ec8cea235602e05e53b2976b">OTNP::q</a></div><div class="ttdeci">bn_t q</div><div class="ttdef"><b>Definition:</b> np.h:13</div></div>
<div class="ttc" id="utils__ec_8h_html_ae5e3f2827ebda785cd770866307cc26d"><div class="ttname"><a href="utils__ec_8h.html#ae5e3f2827ebda785cd770866307cc26d">KDF</a></div><div class="ttdeci">block KDF(eb_t in)</div><div class="ttdef"><b>Definition:</b> utils_ec.hpp:20</div></div>
<div class="ttc" id="class_o_t_n_p_html_a5333e3a3665ba351d47400c3bbe6dfc6"><div class="ttname"><a href="class_o_t_n_p.html#a5333e3a3665ba351d47400c3bbe6dfc6">OTNP::cnt</a></div><div class="ttdeci">int cnt</div><div class="ttdef"><b>Definition:</b> np.h:10</div></div>
<div class="ttc" id="class_o_t_html_a66a5cf62a5b5707e2af40719b2005340"><div class="ttname"><a href="class_o_t.html#a66a5cf62a5b5707e2af40719b2005340">OT&lt; OTNP &gt;::io</a></div><div class="ttdeci">NetIO * io</div><div class="ttdef"><b>Definition:</b> ot.h:9</div></div>
<div class="ttc" id="utils__ec_8h_html_a782fdb3f06e7f49116d014d4a583b19f"><div class="ttname"><a href="utils__ec_8h.html#a782fdb3f06e7f49116d014d4a583b19f">initialize_relic</a></div><div class="ttdeci">void initialize_relic()</div><div class="ttdef"><b>Definition:</b> utils_ec.hpp:8</div></div>
<div class="ttc" id="class_p_r_g_html"><div class="ttname"><a href="class_p_r_g.html">PRG</a></div><div class="ttdef"><b>Definition:</b> prg.h:16</div></div>
<div class="ttc" id="class_o_t_n_p_html_a1eb2d9931d7b74f17b1f4aca024e9729"><div class="ttname"><a href="class_o_t_n_p.html#a1eb2d9931d7b74f17b1f4aca024e9729">OTNP::send_impl</a></div><div class="ttdeci">void send_impl(const block *data0, const block *data1, int length)</div><div class="ttdef"><b>Definition:</b> np.h:24</div></div>
<div class="ttc" id="class_p_r_g_html_ab8560a2768e2ed1d9ce3cdc26a3b793d"><div class="ttname"><a href="class_p_r_g.html#ab8560a2768e2ed1d9ce3cdc26a3b793d">PRG::random_bn</a></div><div class="ttdeci">void random_bn(T t, L... l)</div><div class="ttdef"><b>Definition:</b> prg.h:87</div></div>
<div class="ttc" id="class_o_t_n_p_html_ad0d1e24d65f1fc1f0af785bbfb9e380d"><div class="ttname"><a href="class_o_t_n_p.html#ad0d1e24d65f1fc1f0af785bbfb9e380d">OTNP::C</a></div><div class="ttdeci">eb_t C</div><div class="ttdef"><b>Definition:</b> np.h:11</div></div>
<div class="ttc" id="class_o_t_n_p_html_a3d7cce47607ffe280cb72159349baea7"><div class="ttname"><a href="class_o_t_n_p.html#a3d7cce47607ffe280cb72159349baea7">OTNP::gTbl</a></div><div class="ttdeci">const eb_t * gTbl</div><div class="ttdef"><b>Definition:</b> np.h:12</div></div>
<div class="ttc" id="class_p_r_g_html_a0413492d30592c36c835091915bc9104"><div class="ttname"><a href="class_p_r_g.html#a0413492d30592c36c835091915bc9104">PRG::random_eb</a></div><div class="ttdeci">void random_eb(T t, L... l)</div><div class="ttdef"><b>Definition:</b> prg.h:113</div></div>
<div class="ttc" id="class_o_t_html"><div class="ttname"><a href="class_o_t.html">OT</a></div><div class="ttdef"><b>Definition:</b> ot.h:6</div></div>
<div class="ttc" id="class_o_t_n_p_html_abcfccee46e6dfa46872239da1bdb8714"><div class="ttname"><a href="class_o_t_n_p.html#abcfccee46e6dfa46872239da1bdb8714">OTNP::prg</a></div><div class="ttdeci">PRG prg</div><div class="ttdef"><b>Definition:</b> np.h:14</div></div>
<div class="ttc" id="class_o_t_n_p_html_a81c6f652c7dde3a8d47c7f04e758e7ce"><div class="ttname"><a href="class_o_t_n_p.html#a81c6f652c7dde3a8d47c7f04e758e7ce">OTNP::g</a></div><div class="ttdeci">eb_t g</div><div class="ttdef"><b>Definition:</b> np.h:11</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_ac88365fe90bb4e9eec48638542d51c5.html">emp-ot</a></li><li class="navelem"><a class="el" href="dir_56b62f0454746633164d0b7ddf9c4cfd.html">ot</a></li><li class="navelem"><a class="el" href="np_8h.html">np.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>
